// import { createContext } from 'react'
// import { Provider } from 'react-redux'
// import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'
// import store from 'store/index'
// import BasicLayout from '@/layout/BasicLayout/index'
// import Login from '@/pages/Login/index'
// import Register from '@/pages/Register/index'
// const providerContext = createContext({})

// function Admin ({ dataProvider, routes, children }) {
//   return (
//     <Provider store={store}>
//       <providerContext.Provider value={dataProvider}>
//         <Router>
//           <Routes>
//             <Route key='login' path='/login' element={<Login />} />
//             <Route key='register' path='/register' element={<Register />} />
//             <Route
//               key='home'
//               path='/'
//               element={() => (
//                 <BasicLayout routes={routes}>{children}</BasicLayout>
//               )}
//             />
//           </Routes>
//         </Router>
//       </providerContext.Provider>
//     </Provider>
//   )
// }

// export default Admin
